package com.example.accessingdatajpa.repository;

import com.example.accessingdatajpa.pojo.Goods;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface GoodsRepository extends JpaRepository<Goods,Long> {
    List<Goods> findByCategory_CategoryId(Long categoryId);
    List<Goods> findByGoodsTitleContaining(String goodsTitle);
    List<Goods> findByHotGoods(Integer hotGoods);
    List<Goods> findByNewGoods(Integer newGoods);
    List<Goods> findByNewGoodsAndHotGoodsAndCategory_CategoryId(Integer newGoods,Integer hotGoods,Long categoryId);
}
